package models

import mongodb._
import helpers._
import org.scalatest._

import scala.concurrent.ExecutionContext

trait EmbeddedMongodb extends AsyncFlatSpec with Matchers with BeforeAndAfterAll with Implicits2 {

  val configuration: Configuration = Configuration.load("application.conf")

  implicit val _Pandora: MongodbContext = new MongodbContext(configuration)
  implicit val ec: ExecutionContext     = scala.concurrent.ExecutionContext.Implicits.global

  protected override def afterAll(): Unit = _Pandora.close()
}
